﻿using Admin.NET.Core;
using System.ComponentModel.DataAnnotations;

namespace Admin.NET.Application;

    /// <summary>
    /// 试场基础输入参数
    /// </summary>
    public class ShichangBaseInput
    {
        /// <summary>
        /// 考试
        /// </summary>
        public virtual long KaoshiId { get; set; }
        
        /// <summary>
        /// 试场号
        /// </summary>
        public virtual string ShiChangNum { get; set; }
        
        /// <summary>
        /// 人数
        /// </summary>
        public virtual int Renshu { get; set; }
        
        /// <summary>
        /// 地址1
        /// </summary>
        public virtual string? Address1 { get; set; }
        
        /// <summary>
        /// 地址2
        /// </summary>
        public virtual string? Address2 { get; set; }
        
        /// <summary>
        /// 位置
        /// </summary>
        public virtual string? Weizhi { get; set; }
        
        /// <summary>
        /// 创建者姓名
        /// </summary>
        public virtual string? CreateUserName { get; set; }
        
        /// <summary>
        /// 修改者姓名
        /// </summary>
        public virtual string? UpdateUserName { get; set; }
        
    }

    /// <summary>
    /// 试场分页查询输入参数
    /// </summary>
    public class ShichangInput : BasePageInput
    {
        /// <summary>
        /// 关键字查询
        /// </summary>
        public string? SearchKey { get; set; }

        /// <summary>
        /// 考试
        /// </summary>
        public long? KaoshiId { get; set; }
        
        /// <summary>
        /// 试场号
        /// </summary>
        public string? ShiChangNum { get; set; }
        
        /// <summary>
        /// 人数
        /// </summary>
        public int? Renshu { get; set; }
        
        /// <summary>
        /// 地址1
        /// </summary>
        public string? Address1 { get; set; }
        
        /// <summary>
        /// 地址2
        /// </summary>
        public string? Address2 { get; set; }
        
        /// <summary>
        /// 位置
        /// </summary>
        public string? Weizhi { get; set; }
        
    }

    /// <summary>
    /// 试场增加输入参数
    /// </summary>
    public class AddShichangInput : ShichangBaseInput
    {
        /// <summary>
        /// 考试
        /// </summary>
        [Required(ErrorMessage = "考试不能为空")]
        public override long KaoshiId { get; set; }
        
        /// <summary>
        /// 试场号
        /// </summary>
        [Required(ErrorMessage = "试场号不能为空")]
        public override string ShiChangNum { get; set; }
        
        /// <summary>
        /// 人数
        /// </summary>
        [Required(ErrorMessage = "人数不能为空")]
        public override int Renshu { get; set; }
        
    }

    /// <summary>
    /// 试场删除输入参数
    /// </summary>
    public class DeleteShichangInput : BaseIdInput
    {
    }

    /// <summary>
    /// 试场更新输入参数
    /// </summary>
    public class UpdateShichangInput : ShichangBaseInput
    {
        /// <summary>
        /// 主键Id
        /// </summary>
        [Required(ErrorMessage = "主键Id不能为空")]
        public long Id { get; set; }
        
    }

    /// <summary>
    /// 试场主键查询输入参数
    /// </summary>
    public class QueryByIdShichangInput : DeleteShichangInput
    {

    }

public class SaveShichangInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    [Required(ErrorMessage = "KaoshiId不能为空")]
    public long KaoshiId { get; set; }

    public List<UpdateShichangInput> data { get; set; }
}

public class AutoShichangRenshuInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    [Required(ErrorMessage = "KaoshiId不能为空")]
    public long KaoshiId { get; set; }
}